package com.hundsun.finance.service;

import org.tinygroup.tinyscript.tree.impl.TreeDataNode;

/**
 * 销售服务模块
 * @author yancheng11334
 *
 */
public interface SaleService {

	/**
	 * 新增客户
	 * @param customerName
	 * @param company
	 * @param city
	 * @param area
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  insertCustomer(String customerName,String company,String city,String area) throws Exception;
	
	/**
	 * 修改客户
	 * @param customerId
	 * @param customerName
	 * @param company
	 * @param city
	 * @param area
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  updateCustomer(String customerId,String customerName,String company,String city,String area) throws Exception;
	
	/**
	 * 删除客户
	 * @param customerId
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  deleteCustomer(String customerId) throws Exception;
	
	/**
	 * 获取指定客户
	 * @param customerId
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  getCustomer(String customerId) throws Exception;
	
	/**
	 * 获取全部客户
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  getCustomers() throws Exception;
	
	/**
	 * 新增合同
	 * @param customerId
	 * @param amount
	 * @param sellDate
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  insertContract(String customerId,Double amount,String sellDate) throws Exception;
	
	/**
	 * 修改合同
	 * @param contractId
	 * @param customerId
	 * @param amount
	 * @param sellDate
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  updateContract(String contractId,String customerId,Double amount,String sellDate) throws Exception;
	
	/**
	 * 删除合同
	 * @param contractId
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  deleteContract(String contractId) throws Exception;
	
	/**
	 * 获得单个合同
	 * @param contractId
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  getContract(String contractId) throws Exception;
	
	/**
	 * 获取全部合同
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  getContracts() throws Exception;
	
	/**
	 * 统计某年份的大客户
	 * @param year
	 * @param rate
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  countVip(String year,Double rate) throws Exception;
}
